package com.zhentao.day03.am;

public class MoneyTest {
  public static void main(String[] args) {
    Money money = new Money() ;


  }
}
// 1. 封装是将属性私有化,
// 2. 封装需要提供一些公共的方法或接口, 以便开发人员使用。
class Money{
  private int count ;
  private String color ;
  private String country ;

  // 赋值  set  取值  get
  // 给钱币的面额赋值
  public void setCount(int count) {
    if (count < 0 ){
      this.count = 0 ;
    }
    this.count = count ;
  }
  // 拿到钱币的面额
  public int getCount (){
    return this.count ;
  }

  // ALT + INSERT

  public String getColor() {
    return color;
  }

  public void setColor(String color) {
    this.color = color;
  }

  public String getCountry() {
    return country;
  }

  public void setCountry(String country) {
    this.country = country;
  }
}